Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorporate remaining ledger certificates #119

Merged
merged 10 commits into from
Jul 17, 2023

Conversation

Jimbo4350
Copy link
Contributor

@Jimbo4350 Jimbo4350 commented Jul 14, 2023

Changelog

- description: |
    Incorporate remaining conway certificate types into cardano-api
  # no-api-changes: the API has not changed
  # compatible: the API has changed but is non-breaking
  # breaking: the API has changed in a breaking way
  compatibility: breaking
  # feature: the change implements a new feature in the API
  # bugfix: the change fixes a bug in the API
  # test: the change fixes modifies tests
  # maintenance: the change involves something other than the API
  # If more than one is applicable, it may be put into a list.
  type: feature

Context

Addititional context for the PR goes here.

If the PR fixes a particular issue please provide a
link
to the issue.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • The change log section in the PR description has been filled in
  • New tests are added if needed and existing tests are updated. These may include:
    • golden tests
    • property tests
    • roundtrip tests
  • The version bounds in .cabal files are updated
  • CI passes. See note on CI. The following CI checks are required:
    • Code is linted with hlint. See .github/workflows/check-hlint.yml to get the hlint version
    • Code is formatted with stylish-haskell. See .github/workflows/stylish-haskell.yml to get the stylish-haskell version
    • Code builds on Linux, MacOS and Windows for ghc-8.10.7 and ghc-9.2.7
  • The changelog section in the PR is updated to describe the change
  • Self-reviewed the diff

Note on CI

If your PR is from a fork, the necessary CI jobs won't trigger automatically for security reasons.
You will need to get someone with write privileges. Please contact IOG node developers to do this
for you.

@Jimbo4350 Jimbo4350 force-pushed the jordan/incorporate-ledger-certificates branch 3 times, most recently from 7b65260 to d44e00f Compare July 14, 2023 19:44
imports cardano-ledger's Cardano.Ledger.Api module and other necessary
modules from cardano-ledger
Introduce external module Cardano.Api.Ledger. This module reexports
Cardano.Api.ReexposeLedger with the aim of transitioning cardano-api
(and cardano-cli) to be fully reliant on cardano-ledger-api
ShelleyRelatedCertificate and ConwayCertificate. These wrap the data
types exposed by cardano-ledger that correspond to the certificates
of the aforementioned eras. Certificate era is also a GADT now.
resolve cardano-ledger's certificate related type families to the
correct type given an era.
@Jimbo4350 Jimbo4350 force-pushed the jordan/incorporate-ledger-certificates branch 5 times, most recently from a9e6cd2 to 8303b8c Compare July 17, 2023 15:50
@Jimbo4350 Jimbo4350 force-pushed the jordan/incorporate-ledger-certificates branch 2 times, most recently from c220f39 to e8fdfa0 Compare July 17, 2023 16:49
different requirements of certificates across changing eras:
  StakeDelegationRequirements era
  StakePoolRegistrationRequirements era
  StakePoolRetirementRequirements era
  GenesisKeyDelegationRequirements era
  MirCertificateRequirements era
  DRepRegistrationRequirements era
  CommitteeHotKeyAuthorizationRequirements era
  CommitteeColdkeyResignationRequirements era
  DRepUnregistrationRequirements era

In combination with the following GADTs: ConwayEraOnwards era and
AtMostBabbageEra era.

We inherit the type safety of the ledger's type families via
the ConwayEraOnwards and AtMostBabbageEra GADTs.
Add helper functions selectStakeCredential and filterUnRegCreds
  makeCommitteeColdkeyResignationCertificate
  makeCommitteeHotKeyAuthorizationCertificate
  makeDrepRegistrationCertificate
  makeDrepUnregistrationCertificate

Re-export ledger types:
  MIRTarget
  MIRPot

Import Cardano.Api.ReexposeLedger with the aim of consolidating all of
the ledger modules cardano-api depends on. This will make it easier to
hand off the cardano-api's ledger functionality to the ledger team.
@Jimbo4350 Jimbo4350 force-pushed the jordan/incorporate-ledger-certificates branch from e8fdfa0 to da9be77 Compare July 17, 2023 16:57
@Jimbo4350 Jimbo4350 enabled auto-merge July 17, 2023 17:05
@Jimbo4350 Jimbo4350 added this pull request to the merge queue Jul 17, 2023
Merged via the queue into main with commit 7f2718f Jul 17, 2023
@Jimbo4350 Jimbo4350 deleted the jordan/incorporate-ledger-certificates branch July 17, 2023 17:38
newhoggy added a commit that referenced this pull request Mar 11, 2024
…CLI.Run.EraBased

Move more era-based code to under `Cardano.CLI.EraBased` module
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants